IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[UpdateCliente]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[UpdateCliente]
GO

CREATE PROCEDURE [dbo].[UpdateCliente]
(
	@IdCliente int,
	@UserID uniqueidentifier,
	@Dni varchar(8),
	@Nombre varchar(150),
	@Apellidos varchar(150),
	@Ruc varchar(11),
	@RazonSocial varchar(255),
	@IdDistrito int,
	@Direccion varchar(255),
	@Email varchar(100),
	@Telefono varchar(15),
	@Celular varchar(15),
	@FechaNacimiento datetime,
	@Sexo char(1),
	@Ocupacion varchar(255),
	@Foto varchar(150)
)
AS
BEGIN
	SET NOCOUNT ON

	UPDATE [Cliente]
	SET [UserID] = @UserID, 
		[Dni] = @Dni, 
		[Nombre] = @Nombre, 
		[Apellidos] = @Apellidos, 
		[Ruc] = @Ruc, 
		[RazonSocial] = @RazonSocial,
		[IdDistrito] = @IdDistrito, 
		[Direccion] = @Direccion, 
		[Email] = @Email, 
		[Telefono] = @Telefono, 
		[Celular] = @Celular, 
		[FechaNacimiento] = @FechaNacimiento, 
		[Sexo] = @Sexo, 
		[Ocupacion] = @Ocupacion, 
		[Foto] = @Foto
	WHERE [IdCliente] = @IdCliente

	SET NOCOUNT OFF
END

GO
